﻿using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace CRM.Models
{
    [Table("user_log")]
    [Comment("用户管理_用户日志")]
    [Index(nameof(UserId), Name = "UserId")]
    public class UserLog : BaseModel
    {
        [Column("id"), Key]
        public int Id { get; set; }

        [Column("user_id", TypeName = "int(11)"), Comment("被操作用户id")]
        public int UserId { get; set; }

        [Column("operate_user_id", TypeName = "int(11)"), Comment("操作用户id")]
        public int OperateUserId { get; set; }

        [Column("operate_username", TypeName = "varchar(255)"), Comment("操作用户名")]
        public string OperateUserName { get; set; } = string.Empty;

        [Column("operate_truename", TypeName = "varchar(255)"), Comment("操作用户姓名")]
        public string OperateTrueName { get; set; } = string.Empty;

        [Column("operate_ip", TypeName = "varchar(255)"), Comment("操作用户IP")]
        public string OperateIp { get; set; } = string.Empty;

        [Column("remark", TypeName = "text"), Comment("操作备注")]
        public string Remark { get; set; } = string.Empty;
    }
}
